<html>
<head>
    <script>
        // function aa(){
        //     alert(123);
        // }
        var bb1 = () =>{
            var aa1 = document.getElementById('a1').value;
            var aa2 = document.getElementById('a2').value;
            document.getElementById('a3').value = aa1+aa2;
        }
        var bb2 = () =>{
            var aa1 = document.getElementById('a1').value;
            var aa2 = document.getElementById('a2').value;
            document.getElementById('a3').value = aa1-aa2;
        }
        var bb3 = () =>{
            var aa1 = document.getElementById('a1').value;
            var aa2 = document.getElementById('a2').value;
            document.getElementById('a3').value = aa1*aa2;
        }
        var bb4 = () =>{
            var aa1 = document.getElementById('a1').value;
            var aa2 = document.getElementById('a2').value;
            document.getElementById('a3').value = aa1/aa2;
        }

    </script>
</head>
<body>
    输入1 <input type="text" id="a1"><br>
    输入2 <input type="text" id="a2"><br>
    <button onclick="bb1()">计算和</button>
    <button onclick="bb2()">-</button>
    <button onclick="bb3()">*</button>
    <button onclick="bb4()">/</button><br>

    <input type="text" id="a3"><br>
</body>
</html>